import request from '@/utils/request'

export const getRolesAPI = data => {
  return request.get('/roles', data)
}

export const getquanxianApi = () => {
  return request.get('/rights/tree')
}
export const postquanxianApi = (roleId, data) => {
  return request.post(`/roles/${roleId}/rights`, data)
}
export const delquanxianApi = (id) => {
  return request.delete('roles/' + id)
}
export const deljueseApi = (roleId, perId) => {
  return request.delete(`/roles/${roleId}/rights/${perId}`)
}
export const postjuseApi = (data) => {
  return request.post('roles/', data)
}